<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript">
function search(){
	var title=$("#sr").val();
	$.ajax({
		url:'JsonServlet2',
		type:'post',
		data:{title:title},
		dataType:'json',
		success:function(result){
			console.log(result);
		  $.parseJSON(result);
		  console.log(typeof(result));
		  $("#list").html(result.name+","+result.currentpage+","+result.name+","+result.News.title+",");
		}
	})
}
</script>
<body>
<input type="text" name="search" id="sr" onkeyup="search()"/><input type="button" value="提交"/>
<div id="lsit"></div>
</body>
</html>